package cn.wolfcode.wolf2w.util;

import cn.wolfcode.wolf2w.exception.LogicException;
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;

public class AssertUtil {
    private AssertUtil() {};
    public static void hasLength(@Nullable String text, String message) {
        if (!StringUtils.hasLength(text)) {
            throw new LogicException(message);
        }
    }
    public static void isEquals( String v1, String v2,String message) {
        if (v1==null || !v1.equalsIgnoreCase(v2)) {
            throw new LogicException(message);
        }
    }

}
